import axios from 'axios'
import { takeEvery, put } from 'redux-saga/effects'
import { GET_INIT_DATA } from './actionTypes'
import { initDataAction } from './actionCreators'
function* getInitList() {
  const res = yield axios.get('http://192.168.56.1:9999/abc.json')
  const action = initDataAction(res.data);
  yield put(action)
}
function* mySaga() {
  yield takeEvery(GET_INIT_DATA, getInitList)
}

export default mySaga